package com.wyyz.service.impl;

import com.wyyz.bean.Emp;
import com.wyyz.dao.EmpDao;
import com.wyyz.dao.impl.EmpDaoImpl;
import com.wyyz.service.EmpService;

import java.util.ArrayList;
import java.util.List;

public class EmpServiceImpl implements EmpService {
    EmpDao dao=new EmpDaoImpl();
    @Override
    public List<Emp> getAllEmp() {
        List<Emp> empList=dao.getAllEmp();
        return empList;
    }

    @Override
    public int addEmp(ArrayList arrayList) {
        int add=dao.addEmp(arrayList);
        return add;
    }

    @Override
    public int upDate(int empno,ArrayList arrayList) {
        int update=dao.upDate(empno,arrayList);
        return update;
    }

    @Override
    public int delete(int empno) {
        int x=dao.delete(empno);
        return x;
    }

    @Override
    public List<Emp> query(String ename) {
        List<Emp> empList=dao.query(ename);
        return empList;
    }
}
